<template>
  <div class="login">
    <div class="headerpage">
      <div class="logo">
        <img src="../assets/img/logo.png" alt="" />
        <span>STELLAR</span>
      </div>
      <div class="links">
        <div :class="nowPage == 1 ? 'active' : ''" @click="toHome(1, 'page1')">
          Home
        </div>
        <div :class="nowPage == 2 ? 'active' : ''" @click="toHome(2, 'page2')">
          About Us
        </div>
        <el-dropdown @command="handleCommand">
          <span
            class="el-dropdown-link"
            :class="nowPage > 2 && nowPage < 11 ? 'active' : ''"
          >
            Pico Prime HFT<i class="el-icon-arrow-down el-icon--right"></i>
          </span>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item :command="3">Vision</el-dropdown-item>
            <el-dropdown-item :command="4">Ultimate Goal</el-dropdown-item>
            <el-dropdown-item :command="5">PICO</el-dropdown-item>
            <el-dropdown-item :command="6">Introduce</el-dropdown-item>
            <el-dropdown-item :command="7">HFT</el-dropdown-item>
            <el-dropdown-item :command="8">Establish</el-dropdown-item>
            <el-dropdown-item :command="9">Technology</el-dropdown-item>
            <el-dropdown-item :command="10">Innovatice</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
        <div
          :class="nowPage == 11 ? 'active' : ''"
          @click="toHome(11, 'page11')"
        >
          Advantages
        </div>
        <div
          :class="nowPage == 12 ? 'active' : ''"
          @click="toHome(12, 'page12')"
        >
          Contact Us
        </div>
        <div class="engbox">
          <img src="../assets/img/eng.png" alt="" />
          ENG
        </div>
      </div>
      <div class="loginBtn">
        <span>Login Now</span>
      </div>
    </div>

    <div class="loginPage">
      <div class="img">
        <img src="../assets/img/main15.png" v-if="tab == 1" alt="" />
        <img src="../assets/img/main14.png" v-if="tab == 2" alt="" />
        <img src="../assets/img/main16.png" v-if="tab == 3" alt="" />
      </div>
      <div class="right">
        <div class="loginForm">
          <div class="tilte">{{tab == 1?'Forgot password':tab == 2?'Login':'Register'}}</div>
          <div class="tab">
            <span :class="tab == 1 ? 'active' : ''" @click="tab = 1"
              >Mobile phone 
            </span>
            <span :class="tab == 2 || tab == 3 ? 'active' : ''" @click="tab = 2"
              >Email 
            </span>
          </div>

          <!-- 忘记密码 -->
          <div class="login_phone" v-if="tab == 1">
            <div class="inputs">
              <img src="../assets/img/login2.png" alt="">
              <input type="text"  placeholder="Please enter your phone number" >
            </div>

            <div style="display:flex;justify-content: space-between;">
              <div class="inputs" style="width:70%">
                <img src="../assets/img/login1.png" alt="">
                <input type="text"  placeholder="Please enter a password" >
              </div>
              <div class="inputs" style="width:25%;color: #d3ff3f;cursor: pointer;">
                <span>Send code</span>
              </div>
            </div>

            <div class="inputs">
              <img src="../assets/img/login5.png" alt="">
              <input type="text"  placeholder="Please enter a password" >
            </div>

            <div class="inputs">
              <img src="../assets/img/login5.png" alt="">
              <input type="text"  placeholder="Please enter a password" >
            </div>

            <div class="createBtn">
              <span>Reset password</span>
            </div>

            <div class="desc">
              By clicking register means l have read and agree. <span>User Agreement</span>
            </div>
          </div>


          <!-- 忘记密码 -->
          <div class="login_phone" v-if="tab == 2">
            <div class="inputs">
              <img src="../assets/img/login1.png" alt="">
              <input type="text"  placeholder="Please enter your phone number" >
            </div>

          

            <div class="inputs">
              <img src="../assets/img/login5.png" alt="">
              <input type="text"  placeholder="Please enter a password" >
            </div>

            <div class="otherlink">
              <span class="zhuce" @click="tab = 3">Register now</span>
              <span @click="tab = 1">Forgot your password?</span>
            </div>

            <div class="createBtn">
              <span>Login</span>
            </div>

            <div class="desc2">
              <div>f you’ ve signed into this site before</div>
              <div>use the same credentials here. otherwise</div>
            </div>

           
          </div>

          <!-- 注册 -->
          <div class="login_phone" v-if="tab == 3">
            <div class="inputs">
              <img src="../assets/img/login2.png" alt="">
              <input type="text"  placeholder="Please enter your phone number" >
            </div>

            <div style="display:flex;justify-content: space-between;">
              <div class="inputs" style="width:70%">
                <img src="../assets/img/login1.png" alt="">
                <input type="text"  placeholder="Please enter a password" >
              </div>
              <div class="inputs" style="width:25%;color: #d3ff3f;cursor: pointer;">
                <span>Send code</span>
              </div>
            </div>

            <div class="inputs">
              <img src="../assets/img/login5.png" alt="">
              <input type="text"  placeholder="Please enter a password" >
            </div>

            <div class="inputs">
              <img src="../assets/img/login5.png" alt="">
              <input type="text"  placeholder="Please enter a password" >
            </div>

            <div class="inputs">
              <img src="../assets/img/login4.png" alt="">
              <input type="text"  placeholder="Please enter the recommendation code" >
            </div>

            <div class="createBtn">
              <span>Register</span>
            </div>

            <div class="desc">
              By clicking register means l have read and agree. <span>User Agreement</span>
            </div>

           
          </div>
        </div>

        <div class="lastText">
          <div class="loginsd" @click="tab = 2" v-if="tab == 3">
            Login
          </div>
          <div>
            <img src="../assets/img/yzm.png" alt="">
            <span>Yourinformation is protected by 256-bit SGC</span>
          </div>
          <div>
            encryption for secure transmission
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      nowPage: "",
      tab: 2,
    };
  },
  methods: {
    toHome(num, name) {
      this.$router.push(`/?num=${num}&name=${name}`);
    },
    handleCommand(e) {
      let name = "page" + e;
      this.toHome(e, name);
    },
  },
};
</script>
<style lang="scss" scoped>
.headerpage {
  width: 100%;
  height: 65px;
  display: flex;
  align-items: center;
  padding: 0 10%;
  background-image: linear-gradient(90deg, #2a5550 10%, #1f415c 100%);
  color: #fff;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  .logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    img {
      width: 40px;
      margin-right: 10px;
    }
  }

  .links {
    color: #fff;
    width: 70%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3%;
    div {
      cursor: pointer;
    }
    .engbox {
      display: flex;
      align-items: center;
      img {
        width: 25px;
        margin-right: 5px;
      }
    }
  }

  .loginBtn {
    width: 100px;
    height: 35px;
    background-image: url("../assets/img/btn.png");
    background-size: 100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    span {
      transform: translateY(-3px);
      cursor: pointer;
      font-size: 14px;
    }
  }
}
.el-dropdown-link {
  color: #fff;
}

.loginPage {
  width: 100%;
  height: calc(100vh - 65px);
  background-image: linear-gradient(9deg, #499580 10%, #356f97 100%);
  padding: 0 10%;
  display: flex;
  align-items: center;
  display: flex;
  align-content: center;
  justify-content: space-between;

  .desc{
    color: #fff;
    margin-top: 20px;
    text-align: center;
    font-size: 15px;
    span{
      color: #d3ff3f;
    }
  }

  .desc2{
    text-align: center;
    color: #9cbcc6;
    margin-top: 20px;
    div{
      font-size: 14px;
    }
  }
  .img {
    width: 50%;
    img {
      width: 100%;
    }
  }

  .right {
    width: 40%;
    .loginForm {
      width: 100%;
      background: #0000004d;
      border-radius: 10px;
      padding: 30px 40px;
      .tilte {
        color: #fff;
        font-size: 34px;
        margin-bottom: 30px;
      }
      .tab {
        color: #fff;
        margin-bottom: 30px;
        span {
          font-size: 18px;
          position: relative;
          margin-right: 70px;
          border-bottom: 2px solid #d3ff3f00;
          padding: 0 10px;
          padding-bottom: 8px;
          cursor: pointer;
        }
        .active {
          border-color: #d3ff3f;
          color: #d3ff3f;
        }
      }

      .login_phone{
        .inputs{
          width: 100%;
          height: 50px;
          background: #0333429e;
          border-radius: 10px;
          display: flex;
          align-items: center;
          padding: 0 20px;
          position: relative;
          margin-bottom: 15px;
          img{
            width: 20px;
          }
          input{
            border: none;
            outline: none;
           background: #03334200;
           height: 100%;
           margin-left: 10px;
           color: #fff;
           width: 80%;
          }
        }
      }
    }
  }
}

.otherlink{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  color: #fff;
  span{
    cursor: pointer;
    font-size: 15px;
  }
  .zhuce{
    color: #d3ff3f;
    text-decoration:underline;
  }
}

input::placeholder {
  color: #b3c5cb;
}

.createBtn {
  width: 100%;
  height: 55px;
  background-image: url("../assets/img/loginBtn.png");
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 5px;
  padding-bottom: 10px;
  cursor: pointer;
  span{
    font-size: 22px;
    font-weight: bold;
  }
}

.lastText{
  text-align: center;
  margin-top: 20px;
  color: #d3ff3f;
  .loginsd{
  color: #d3ff3f;
font-size: 28px;
text-decoration:underline;
margin-bottom: 10px;
cursor: pointer;
  }
  div{
    display: flex;
    align-items: center;
    justify-content: center;
  }
  img{
    width: 26px;
    margin-right: 5px;
  }
}
</style>
